using NUnit.Framework;
using Tycho.Parser.Syntax;

namespace Tycho.Parser.Tests.Syntax {
    [TestFixture]
    public class DelimiterSyntaxSpecification {
        [Test]
        public void AccumulateCapturesShouldAddCapturesForItemAndDelimiterAsMultiples() {
            var accumulator = new CaptureAccumulator ();
            var delimiterSyntax = new DelimiterSyntax (new CaptureSyntax ("item", null), new CaptureSyntax ("delimiter", null));

            delimiterSyntax.AccumulateCaptures (accumulator);

            Assert.AreEqual (true, accumulator.Captures ["item"]);
            Assert.AreEqual (true, accumulator.Captures ["delimiter"]);
        }
    }
}